Optimal. Leaf size=103 \[ \frac{2 \left (3 a^2-2 b^2\right ) \sqrt{\cos (e+f x)} F\left (\left .\frac{1}{2} (e+f x)\right |2\right ) \sqrt{d \sec (e+f x)}}{3 f}+\frac{10 a b \sqrt{d \sec (e+f x)}}{3 f}+\frac{2 b \sqrt{d \sec (e+f x)} (a+b \tan (e+f x))}{3 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.123328, antiderivative size = 103, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.16, Rules used = {3508, 3486, 3771, 2641} \[ \frac{2 \left (3 a^2-2 b^2\right ) \sqrt{\cos (e+f x)} F\left (\left .\frac{1}{2} (e+f x)\right |2\right ) \sqrt{d \sec (e+f x)}}{3 f}+\frac{10 a b \sqrt{d \sec (e+f x)}}{3 f}+\frac{2 b \sqrt{d \sec (e+f x)} (a+b \tan (e+f x))}{3 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3508
Rule 3486
Rule 3771
Rule 2641
Rubi steps
\begin{align*} \int \sqrt{d \sec (e+f x)} (a+b \tan (e+f x))^2 \, dx &=\frac{2 b \sqrt{d \sec (e+f x)} (a+b \tan (e+f x))}{3 f}+\frac{2}{3} \int \sqrt{d \sec (e+f x)} \left (\frac{3 a^2}{2}-b^2+\frac{5}{2} a b \tan (e+f x)\right ) \, dx\\ &=\frac{10 a b \sqrt{d \sec (e+f x)}}{3 f}+\frac{2 b \sqrt{d \sec (e+f x)} (a+b \tan (e+f x))}{3 f}+\frac{1}{3} \left (3 a^2-2 b^2\right ) \int \sqrt{d \sec (e+f x)} \, dx\\ &=\frac{10 a b \sqrt{d \sec (e+f x)}}{3 f}+\frac{2 b \sqrt{d \sec (e+f x)} (a+b \tan (e+f x))}{3 f}+\frac{1}{3} \left (\left (3 a^2-2 b^2\right ) \sqrt{\cos (e+f x)} \sqrt{d \sec (e+f x)}\right ) \int \frac{1}{\sqrt{\cos (e+f x)}} \, dx\\ &=\frac{10 a b \sqrt{d \sec (e+f x)}}{3 f}+\frac{2 \left (3 a^2-2 b^2\right ) \sqrt{\cos (e+f x)} F\left (\left .\frac{1}{2} (e+f x)\right |2\right ) \sqrt{d \sec (e+f x)}}{3 f}+\frac{2 b \sqrt{d \sec (e+f x)} (a+b \tan (e+f x))}{3 f}\\ \end{align*}
Mathematica [A] time = 0.617032, size = 87, normalized size = 0.84 \[ \frac{2 \sec ^2(e+f x) \sqrt{d \sec (e+f x)} \left (\left (3 a^2-2 b^2\right ) \cos ^{\frac{5}{2}}(e+f x) F\left (\left .\frac{1}{2} (e+f x)\right |2\right )+b \cos (e+f x) (6 a \cos (e+f x)+b \sin (e+f x))\right )}{3 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] time = 0.282, size = 339, normalized size = 3.3 \begin{align*}{\frac{2\, \left ( \cos \left ( fx+e \right ) -1 \right ) ^{2} \left ( \cos \left ( fx+e \right ) +1 \right ) ^{2}}{3\,f\cos \left ( fx+e \right ) \left ( \sin \left ( fx+e \right ) \right ) ^{4}}\sqrt{{\frac{d}{\cos \left ( fx+e \right ) }}} \left ( 3\,i \left ( \cos \left ( fx+e \right ) \right ) ^{2}{\it EllipticF} \left ({\frac{i \left ( \cos \left ( fx+e \right ) -1 \right ) }{\sin \left ( fx+e \right ) }},i \right ) \sqrt{{\frac{\cos \left ( fx+e \right ) }{\cos \left ( fx+e \right ) +1}}}\sqrt{ \left ( \cos \left ( fx+e \right ) +1 \right ) ^{-1}}{a}^{2}-2\,i \left ( \cos \left ( fx+e \right ) \right ) ^{2}{\it EllipticF} \left ({\frac{i \left ( \cos \left ( fx+e \right ) -1 \right ) }{\sin \left ( fx+e \right ) }},i \right ) \sqrt{{\frac{\cos \left ( fx+e \right ) }{\cos \left ( fx+e \right ) +1}}}\sqrt{ \left ( \cos \left ( fx+e \right ) +1 \right ) ^{-1}}{b}^{2}+3\,i\cos \left ( fx+e \right ){\it EllipticF} \left ({\frac{i \left ( \cos \left ( fx+e \right ) -1 \right ) }{\sin \left ( fx+e \right ) }},i \right ) \sqrt{{\frac{\cos \left ( fx+e \right ) }{\cos \left ( fx+e \right ) +1}}}\sqrt{ \left ( \cos \left ( fx+e \right ) +1 \right ) ^{-1}}{a}^{2}-2\,i\cos \left ( fx+e \right ){\it EllipticF} \left ({\frac{i \left ( \cos \left ( fx+e \right ) -1 \right ) }{\sin \left ( fx+e \right ) }},i \right ) \sqrt{{\frac{\cos \left ( fx+e \right ) }{\cos \left ( fx+e \right ) +1}}}\sqrt{ \left ( \cos \left ( fx+e \right ) +1 \right ) ^{-1}}{b}^{2}+6\,\cos \left ( fx+e \right ) ab+\sin \left ( fx+e \right ){b}^{2} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{d \sec \left (f x + e\right )}{\left (b \tan \left (f x + e\right ) + a\right )}^{2}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left ({\left (b^{2} \tan \left (f x + e\right )^{2} + 2 \, a b \tan \left (f x + e\right ) + a^{2}\right )} \sqrt{d \sec \left (f x + e\right )}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{d \sec{\left (e + f x \right )}} \left (a + b \tan{\left (e + f x \right )}\right )^{2}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{d \sec \left (f x + e\right )}{\left (b \tan \left (f x + e\right ) + a\right )}^{2}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]